package com.huluobo.base.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.huluobo.base.bean.UserBean

/**
 *  Created by LC on 2024/10/21.
 */
@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertUserInfo(userBean: UserBean)

    @Update
    suspend fun updateUserInfo(userBean: UserBean)

    @Delete
    suspend fun deleteUserInfo(userBean: UserBean)

    @Query("select * from user_info where uName = :username")
    suspend fun queryUserInfoByName(username: String): UserBean
}